package zheng.mockit;

import zheng.mockit.plugin.IPlugin;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by zcz on 16-7-29.
 */
public class MockitCore {

    private MessageHandler messageHandler = new DefaultMessageHandler();

    private Map<String, IPlugin> pluginMap = new HashMap<String, IPlugin>();

    public Map<String, IPlugin> getPluginMap() {
        return pluginMap;
    }

    public void clear() {
        pluginMap.clear();
    }

    public void addPlugin(String key, IPlugin plugin) {
        pluginMap.put(key, plugin);
    }

    public void removePlugin(String key) {
        pluginMap.remove(key);
    }

    public MessageHandler getMessageHandler() {
        return messageHandler;
    }
}
